from urllib.request import urlopen
import bs4
html = urlopen("http://www.ngchina.com.cn/animals/").read().decode('utf-8')
soup = bs4.BeautifulSoup(html,features='lxml')  #lxml 是解析的器形式
print(soup.title)
all_href = soup.find_all('a')  #find_all 的意思是找到全部的’a‘
for i in all_href:
    if i['href']:
        print(i['href'])
    else:
        pass

